<?php

return [
    'app' => [
        //项目名称
        'app_name' => 'ERP',
        //版本号
        'version' => '1.0',
        //日志根目录
        'log_path' => APP_PATH . '/app/cache/logs/',
        //缓存路径
        'cache_path' => APP_PATH . '/app/cache/data/',

        //主域名，ERP系统访问的域名
        'main_host' => 'www.food.test',

        //Shop系统域名
        'shop_host' => 'shop.e-asa.com',
    ],

    'mode' => 'develop', //product

    //数据库表配置
    'database' => [
        //数据库连接信息
//        'db' => [
//            "host" => "pc-j6c8qgbx4b647e9ta.rwlb.rds.aliyuncs.com",
//            "username" => "erp",
//            "password" => "ERP_123456",
//            "dbname" => "erp",
//        ],
        'db' => [
            "host" => "127.0.0.1",
            "username" => "root",
            "password" => "root",
            "dbname" => "food",
        ],
        //表前缀
        'prefix' => '',
    ],

    //默认语言
    "language" => "cn",

    "languages" => [
        "cn" => ["code" => "cn", "name" => "简体中文", "shortName" => "简"],
        //        "hk" => array("code"=>"hk","name"=>"繁体中文","shortName" => "繁"),
        "en" => ["code" => "en", "name" => "英文", "shortName" => "英"],
        "it" => ["code" => "it", "name" => "意大利语", "shortName" => "意"],
    ],

    "productstock_service" => [
        "server" => "http://127.0.0.1:3000"
    ],

    //上传文件的保存目录
//    "upload_dir" => "/opt/web/images/",
    "upload_dir" => "/home/wwwroot/default/phalcon-erp-food/public/",
    "upload"     =>"upload/",

    //访问上传文件的浏览路径前缀
//    "file_prex" => "http://pic.e-asa.com/",
    "file_prex" => "http://www.food.test/",

    //email发信设置，注册成功后发送邮件
    'email_config' => [
        'secure' => 'ssl',     //链接加密方式 Options: "", "ssl" or "tls"; 为空时, 端口一般是25; ssl , 端口一般为 465;
        'host' => 'smtp.exmail.qq.com',     //SMTP 服务器
        'port' => '465',    //SMTP 端口, 一般为25, QQ为465或587
        'username' => 'custom@liuzongyang.com', //邮箱帐号
        'psw' => 'Nokia3720c', //邮箱密码 QQ使用SMTP授权码 uwrfbgqqfodjfaea
        'From' => 'custom@liuzongyang.com', //发件人地址
        'FromName' => 'custom@liuzongyang.com', //发件人姓名
    ],

    //aliyun-cdn相关
    'alibabacloud' => [
        'accessKeyId' => 'LTAIIrjLY7GB0wjf',
        'accessKeySecret' => 'j0GsvvgK0TzFUnha1Q8wPSF1jCH2BY',
    ],

    //支付相关参数
    'pay' => [
        // 微信原生支付配置参数
        'wechat' => [
            // 公众号 APPID
            'app_id' => 'wx75732915fa967aca',
            // 商户号
            'mch_id' => '1536978981',
            // API 密钥
            'key' => 'wwwjingjingshop20190610JINGJINGh',
            // 微信异步通知地址
            'notify_url' => 'http://shop.e-asa.com/wechat/notify',
            // 证书相关，退款的时候会用到
            'cert_client' => APP_PATH . '/app/shop/packages/wechatpay/cert/apiclient_cert.pem',
            'cert_key' => APP_PATH . '/app/shop/packages/wechatpay/cert/apiclient_key.pem',
            'log' => [
                'file' => APP_PATH . '/app/cache/logs/wechat.log',
                'level' => 'debug', // 建议生产环境等级调整为 info，开发环境为 debug
                'type' => 'daily', // optional, 可选 daily.
                'max_file' => 30, // optional, 当 type 为 daily 时有效，默认 30 天
            ],
            'http' => [
                // optional
                'timeout' => 5.0,
                'connect_timeout' => 5.0,
                // 更多配置项请参考 [Guzzle](https://guzzle-cn.readthedocs.io/zh_CN/latest/request-options.html)
            ],
            // 设置为service为服务商模式
            'mode' => 'service',
        ],

        // 第三方---支付宝相关参数，这个是正式环境的应用配置。
        'alipay' => [
            // 发起请求的应用ID
            'app_id' => '2019070265766498', // 正式
            // 异步通知地址
            'notify_url' => 'http://shop.e-asa.com/alipay/notify',
            // 同步通知地址
            'return_url' => 'http://shop.e-asa.com/alipay/return',
            // 支付宝公钥
            // 正式
            'ali_public_key' => 'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA1eaQTwKDnHADFHeqzxfph57AQYThlDFhiTq1SgdLi05bIRm6n33biKcQaAxQXAGIvp4H+7vRW4ZG4v5zSdh2s4Ra8AmJQznI0ngBWjmz+SFOCQPFw4zF3O9OwiPAwvvNCgVj2ZWDv24/Ah1nzqhUXrGAivobNvTOeC72GGEO/eVCVPLPkZM3oYDbMosma9giRoruI7C/ZOvjjXlkv8pXa5ScywvYzzurACub/V8H8ommRyXdXSiu6MI+VtN9BaL4i0bNnM6Yf6OGP4wbWxUHIMoZSO+CKG8pAFGN5eFtGZZiheBeR8QE5ghfsap+J3jCtQwTL3TbILAoMPfRfQ9+LwIDAQAB',
            // 应用私钥，加密方式： **RSA2**
            // 正式
            'private_key' => 'MIIEowIBAAKCAQEAxgX5VjeiXni0FCKr3P3Ov/byfNEsGw/R593W364kcAx2/17Oa2RT1oO56j33T6VLNh1k1EfdgjSYXykgiTDSV9AY0f0rzkDwIIMwhjDtKrJFoP89W2iX9mVzvIdWxNdrySFTvMBZVoxw7VbhzVo3rEjLzZhHoq/muciBUPR2cHfeaeQm5ggyciSdaBAzhvGasKk5tLyxzgiilwLiCfnvn2xpVFbzJUCJIUPtiE6Teo5+FuI3A09T60jAXjKkIicOPyhsKoPgKDyeEm794AHVrJ8Ayu6mQg4oZXOVxs4aG5qhWV3CDILPQjKQPrfy98BL7GeK9iyl0M2uaTLneLpGWwIDAQABAoIBAGRsmypSRJHMfObJPodwX+2Sex85pTiEKVuBcXs2gVwhtieEGQL1el8LprlYe5d0qFPlTEErwPZLXgrEfK+WhtXpvuyfjBupax3R6kXjgiNpDU68oo082fQnNy6hJCvnY844jJLoqWXvC0YSDalq21kQAeteEtY6hrQpLwuzLm2SN+3/hDOxRcSs9TR5HwlYwx3p3am0OqlDO6kJceiObtEscCsMoWSHa4cTUa2AeiIu2py/L6bjOQ0QiQOXgrs+841Tt/9uxlVFP79PSx9Oa+HEcRAWXoYBR2GS+SPUPqk9ZJywS/+XPnSNxDGZm9Y5zHOxT0QvBwBD6K/8fN4mbYECgYEA8BsBVxSLljAWgDDgoq5bF2RTDduHa/U+uZNFeq7tPF20xUDuSM4ExxUY4jJ7GcIwZCjG4unKheC7DKsHIj/rGzD+aiBts+7DapbG8N4//2+GOFJBzt8dNZU2ZBMaw4XMIzSFO86oLK3gIFFV24zQyj2eYgCSRKWwubcPIqNlQksCgYEA0yHQtZrpNEpKjH156f23KvnpkcVp3NXBNvY0rV8NYgOMb10paLzG3VNwwuzurvhaLqsUyzHtzkEyvCQNuh8aCXO4J6o3KBh6rBGlkTkkQAnjXhx/Ab9Pnej2GDs5EKp6zHJjMdqe+KIXpWMvxIpJmueV9jwUHbM1iOxkbrL8AjECgYEA4+i+XOojlWwP7551m/XkgU+5hm3bHZ6s63nfeZSRm7tW2+XGSVVFM7PS6uL/9nNde7U5FCrXEj0/T8cH/nqtsCHRXOtrNmBtHcABFqHgHZa+0LdDwBoIn9QCzPtVbEKUgtZXoW2INODW3dZWqRABH/ddX6krLf4YwjABLd/rPgECgYAXTt1enxptpmHyfout9E97VBmf+R5FvedVrPqFxT+R+XhQdwVyRZzipCqHqmZzNIGoM0TZZcquAW6bbJODX5mdP4QuBNGQAJvSUSRpEtjYpP7Pze+LftZIRYadiDQ1jcx+s4YV49+27RYVMQz98pJLopNgmqNR4A3h7s7rlaDSkQKBgBE2g+UPaepEPveiAurpE9yfnU2uewi6u7FnTHRFvOYlggNIYrdVx0hXeuIsuktL01MdHueZ75G09DcXLu3RHhkA16E4Y/c26PZxfjDv1eWdUtKHFSQe+Oo/SNGgu/4w4wHVui587WLXeNp5Rb9M71EQ+2m5jYh8itwpHbGlRzyw',
            'log' => [
                'file' => APP_PATH . '/app/cache/logs/alipay.log',
                'level' => 'debug', // 建议生产环境等级调整为 info，开发环境为 debug
                'type' => 'daily', // optional, 可选 daily.
                'max_file' => 30, // optional, 当 type 为 daily 时有效，默认 30 天
            ],
            'http' => [
                'timeout' => 5.0,
                'connect_timeout' => 5.0,
                // 更多配置项请参考 [Guzzle](https://guzzle-cn.readthedocs.io/zh_CN/latest/request-options.html)
            ],
            // 'mode' => 'dev', // optional,设置此参数，将进入沙箱模式
            // 支付宝网关，新增属性
            'gateway' => 'https://openapi.alipay.com/gateway.do',    // 正式
            // 授权请求根域名
            'auth_url' => 'openauth.alipay.com', // 正式
        ],
    ],

    // 队列参数设置
    'queue'                => [
        // 任务优先级
        'priority' => 250,
        // 延迟时间，表示将job放入ready队列需要等待的秒数，10代表10秒
        'delay'    => 10,
        // 运行时间，表示允许一个worker执行该job的秒数。这个时间将从一个worker 获取一个job开始计算
        'ttr'      => 3600,
    ],

    // OMS 配置
    'oms'                  => [
        // token接口
        'token'            => [
            // 远程请求 url
            'remote_url' => 'https://api.jingjing.shop/token',
            // 类型
            'grant_type' => 'password',
            // 用户名
            'username'   => 'testerp@erp.com',
            // 密码
            'password'   => 'ERP!@1234erp',
        ],
        // 客户端id
        'ClientGuid'       => 'c25917bd-8d88-4b8d-8498-56df00ae762a',
        // 客户端名称
        'ClientName'       => 'ASA-WEBERP',
        // 供应商Id，传OMS指定值
        'VendorId'         => 29,
        // 供应商Guid，传OMS指定值
        'VendorGuid'       => '4a9d0661-c0c7-4475-a741-3082a4caf9e8',
        // 商品档案上新和更新接口
        'Inventory_update' => [
            // 远程请求 url
            'remote_url' => 'https://api.jingjing.shop/api/Inventory/update',
            // 'remote_url' => 'https://erp.e-asa.com/oms/updates',
        ],
        // 库存相关接口
        'stock'            => [
            // 库存更新
            'stockupdate' => [
                // 远程请求 url
                'remote_url'     => 'https://api.jingjing.shop/api/stock/stockupdate',
                // 'remote_url'     => 'https://erp.e-asa.com/oms/updates',
                // 出入库类型，默认传0
                'InOutType'      => 0,
                // 供应商Id，传OMS指定值
                'SupplierId'     => 29,
                // 来源仓库Id，传OMS指定值
                'FromWareHoseID' => 5,
                // 仓库Id，传OMS指定值
                'WareHoseId'     => 5,
                // 发货人Id，传OMS指定值
                'ConsignorId'    => 9,
            ],
        ],
        // 订单相关接口
        'order'            => [
            // 查询
            'query'    => [
                // 远程请求 url
                'remote_url'     => 'https://api.jingjing.shop/api/stock/stockupdate',
                // 'remote_url' => 'https://erp.e-asa.com/oms/updates',
            ],
            // 发货
            'delivery' => [
                // 远程请求 url
                'remote_url'     => 'https://api.jingjing.shop/api/order/delivery',
                // 'remote_url' => 'https://erp.e-asa.com/oms/updates',
            ],
        ],
    ],

];
